Circuit responsive to a voltage change for detecting erroneous writing into a memory

ABSTRACT

A circuit for detecting a power supply voltage in a memory apparatus comprises a first circuit, through which flows a first saturating current which is constant when a power supply voltage is above a predetermined value, and a second circuit, through which flows a second current which increases in proportion to the power supply voltage when it is above the predetermined value. The first circuit includes an N-channel enhancement mode insulated gate field effect transistor (&#34;NE-IGFET&#34;), and the second circuit includes an N-channel depletion mode insulated gate field effect transistor (&#34;ND-IGFET&#34;). A power supply voltage is thus detected by responsive to a difference between the threshold values of the NE-IFGET and ND-IFGET, which is not dependent on a temperature.

FIELD OF THE INVENTION

This invention relates to a circuit for detecting a voltage in a memory apparatus, and more particularly to, a circuit for detecting a decrease of a power supply voltage and an input high voltage in an electrically erasable and programable read-only memory (defined "EEPROM" hereinafter) including mainly insulated-gate field-effect transistors (defined "IGFETs" hereinafter).

BACKGROUND OF THE INVENTION

An EEPROM is provided with external input terminals such as a chip enable terminal CE, a write enable terminal WE, an output enable terminal OE, etc., to be mounted in, for instance, an information processing system, so that a writing or an erasing is carried out in a writing mode which is set by aplying high and low signals to the above terminals.

One example of modes to be set is explained in the below table.

    ______________________________________                                                TERMINAL                                                                 MODE                                                                                    ##STR1##                                                                                ##STR2##                                                                                ##STR3##                                                                              I/O                                         ______________________________________                                         READ     L        H        L      DATA                                                                           OUTPUT                                       WRITE    L        L        H      DATA                                                                           INPUT                                        STAND-BY H        NON-     NON-   HIGH-                                                          SPECI-   SPECI- IMPEDANCE                                                      FIED     FIED                                                INHIBIT OF                                                                              NON-     NON-     H                                                   WRITE    SPECI-   SPECI-                                                                FIED     FIED                                                                  NON-     H        NON-                                                         SPECI-            SPECI-                                                       FIED              FIED                                                ______________________________________                                    

In this table, the letter "H" is a high signal, and the letter "L" is a low signal. Furthermore, the letters "I/O" indicate an input and output terminal.

Even if one of the modes is correctly selected by applying the signals specified in the table to the respective terminals, an erroneous writing or an erroneous erasing is liable to occur in memory cells in the EEPROM, where a power supply is shut off or a voltage thereof is decreased outside an operation voltage range due to a failure, etc. of the system in which the EEPROM is mounted. For instance, where the stand-by mode is set in the state that a high signal is applied to the CE terminal, a low signal is applied to the WE terminal, and a high signal is applied to the OE terminal, it is assumed that a power supply voltage is abruptly decreased, so that the high signals of the CE and OE terminals are changed to be low. In this situation, it is further assumed that a capacitive load is connected to the OE terminal ten times faster than a capacitive load is connected to the CE terminal, so that a rate by which a voltage is changed from the high signal to a low signal at the CE terminal is faster than a rate of the change at the OE terminal. This results in a signal state of a writing mode in the above table momentarily. As a result, indefinite data on the I/O terminal having a state of a high impedance for the stand-by mode are erroneously written into an address of a memory cell.

For the purpose of avoiding such an erroneous writing occuring due to the decrease of the power supply voltage, a circuit for detecting the voltage decrease is generally built in an EEPROM system. The power supply voltage detecting circuit supplies a high signal at its output terminal, when a power supply voltage Vcc is larger than a predetermined voltage Vcc.sub.(INV), and a low signal at its output terminal, when the voltage Vcc is equal to or smaller than the voltage Vcc.sub.(INV). Consequently, the EEPROM is controlled to be in an inhibit state of a data writing, where the low signal is supplied from the output terminal of the detecting circuit. As a matter of course, the voltage Vcc.sub.(INV) is determined to be lower than an operating range of the power supply voltage Vcc, and is desired to be suppressed from the change thereof due to the fluctuation of an environmental temperature around the EEPROM, device parameters of transistors in fabricating the EEPROM, etc.

If it is assumed that the voltage Vcc.sub.(INV) is increased to be inside the operating range of the power supply voltage, a data writing becomes impossible even in an ordinary writing mode. On the contrary, if the voltage Vcc.sub.(INV) is set to be too low, it becomes impossible to detect the decrease of the power supply voltage Vcc precisely, so that the aforementioned erroneous writing occurs in the EEPROM.

A conventional circuit for detecting the decrease of a power supply voltage includes three Nchannel enhancement mode IGFETs (defined "NE-IGFETs" hereinafter), two N-channel depletion mode IGFET (defined "ND-IGFET" hereinafter), and an inverter, such that a high or low signal is supplied from an output terminal of the inverter dependent on a detecting result of a power supply voltage Vcc, although the structure and operation of the detecting circuit will be explained in detail later. Accordingly, an erroneous writing can be avoided in accordance with the output signal of the inverter in the detecting circuit.

However, the conventional circuit for detecting a decrease of a power supply voltage has disadvantages as follows, the cause of which will be also explained in detail later.

(1) The predetermined voltage Vcc.sub.(INV) is set to be three times a threshold voltage of the NE-IGFET. Therefore, where the threshold voltage is changed due to a temperature change by ΔV_(THN), the predetermined voltage Vcc.sub.(INV) is changed as much as 3. ΔV_(THN). As a result, the predetermined voltage Vcc.sub.(INV) is increased at a low temperature to be near the operating voltage range (for example, 4.5 V to 5.5 V), while the predetermined voltage Vcc.sub.(INV) is decreased at a high temperature, thereby making it difficult to detect a decrease of a power supply voltage precisely.

(2) In order that the predetermined voltage Vcc.sub.(INV) is not inside the operating voltage range at a low temperature, the predetermined voltage Vcc.sub.(INV) must be designed by considering a temperature characteristic of the threshold voltage of the NEIGFET. For this reason, the design of the circuit for detecting the decrease of a power supply voltage becomes difficult.

(3) The predetermined voltage Vcc.sub.(INV) is liable to be too low at a low temperature, thereby making it difficult to avoid an erroneous writing of the EEPROM occuring due to the decrease of the power supply voltage in a wide temperature range. Consequently, the usage temperature range of the EEPROM becomes narrow.

SUMMARY OF THE INVENTION

Accordingly, it is an object of this invention to provide a circuit for detecting a voltage in a memory apparatus, the design of which is easy.

It is a further object of this invention to provide a circuit for detecting a voltage in a memory apparatus, in which the detection of a power supply voltage is carried out in a wide temperature range.

It is a still further object of this invention to provide a circuit for detecting a voltage in a memory apparatus, by which the inhibit of an ordinary operation of the EEPROM is avoided at a high temperature, and an erroneous writing is avoided in the EEPROM at a low temperature.

According to this invention, a circuit for detecting a voltage in a memory apparatus, comprises:

a first p-channel field-effect transistor having a source connected to a power supply, and a gate and a drain commonly connected;

an n-channel depletion mode field-effect transistor having a drain connected to the drain of the first p-channel field effect transistor, and a gate and a source commonly connected to the ground;

a field-effect transistor having a gate connected to the power supply to be turned on;

a first n-channel enhancement mode field-effect transistor having a drain and a gate commonly connected to a drain of the field-effect transistor and a source connected to the ground;

a second p-channel field-effect transistor having a source connected to the power supply, a gate connected to a common node between the first p-channel field-effect transistor and the n-channel depletion mode field-effect transistor, and a drain connected to a voltage detecting node;

a second n-channel enhancement mode field-effect transistor having a drain connected through the voltage detecting node to the drain of the second p-channel field-effect transistor, a gate connected to a common node between the field-effect transistor and the first n-channel mode enhancement mode field-effect transistor, and a source connected to the ground; and

an inverter connected between the power supply and the ground, and having an input terminal connected to the voltage detecting node and an output terminal for providing a voltage detected result.

BRIEF DESCRIPTION OF THE DRAWINGS

This invention will be explained in more detail in conjunction with appended drawings, wherein:

FIG. 1 is a circuitry diagram showing a conventional circuit for detecting a decrease of a power supply voltage in a memory apparatus.

FIG. 2 is an explanatory diagram showing voltages changing at nodes C₁, C₂, C₃ and C₄ in acordance with the change of a power supply voltage,

FIG. 3 is an explanatory diagram showing the change of a predetermined voltage to be detected in the circuit in FIG. 1,

FIG. 4 is a circuitry diagram showing a circuit for detecting a decrease of a power supply voltage in a memory system in a first preferred embodiment according to the invention,

FIG. 5 is an explanatory diagram showing the change of currents IL₁ and IL₂ in accordance with the change of a power supply voltage,

FIG. 6 is an explanatory diagram showing voltages at nodes A₁, A₂ and A₄ changing in accordance with the change of a power supply voltage,

FIG. 7 is an explanatory diagram showing a predetermined voltage to be detected which is not changed dependent on a temperature,

FIG. 8 is a circuitry diagram showing an input high voltage detecting circuit in a second preferred embodiment according to the invention,

FIG. 9 is an explanatory diagram showing the change of currents IL₃ and IL₄ in accordance with the change of an external applied voltage in FIG. 8, and

FIG. 10 is an explanatory diagram showing the change of voltage at nodes B₁, B₂, and B₄ in accordance with the change of the external applied voltage

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Before explaining a circuit for detecting a voltage in a memory apparatus in a preferred embodiment according to the invention, the aforementioned conventional circuit for detecting a power supply voltage in an EEPROM will be explained again.

FIG. 1 shows the conventional circuit for detecting a power supply voltage which comprises NEIGFETs Q₂₁, Q₂₂ and Q₂₅, ND-IGFETs Q₂₃ and Q₂₄, and an inverter I connected between a power supply CC and the ground, wherein the NE-IGFETs and ND-IGFETs Q₂₁ to Q₂₅ are connected via nodes C₁, C₂ and C₃ to each other, and the inverter I is connected at an input terminal to the mode C₃ and at an output terminal to the node C₄. In this circuit, each IGFET is designed in regard to a ratio of a gate width to a gate length (defined "W/L" hereinafter), such that an equivalent resistance of Q₂₃ is higher than those of Q₂₁ and Q₂₂, and an equivalent resistance of Q₂₄ is higher than that of Q₂₅. For instance, the ratio of W/L is designed to be 60/3 for Q₂₁ and Q₂₂, 6/2000 for Q₂₃ and Q₂₄, and 60/3 for Q₂₅. Therefore, currents flowing through Q₂₁ to Q₂₃, and through Q₂₄ and Q₂₅ are as small as approximately 0.5 μA. Furthermore, a logic threshold value of an inverter composed of Q₂₄ and Q₂₅ is set to be V_(THN) which is a threshold value common to the NE-IGFETs.

In operation, a voltage Vcc of a power supply CC is applied to the circuit, so that voltages VC₁, VC₂, VC₃ and VC₄ of the nodes C₁ to C₄ are changed, where the voltage Vcc is changed, as shown in FIG. 2.

    Vcc>3·V.sub.THN                                   (1)

The voltage VC₂ is higher at the node C₂ than the threshold voltage V_(THN), so that the voltage VC₃ is O V (the ground level) at the node C₃, and the voltage VC₄ is Vcc at the node C₄.

    Vcc≦3·V.sub.THN                            (2)

As the power supply voltage Vcc is decreased, the voltages VC₁ and VC₂ of the nodes C₁ and C₂ are also decreased. Where the voltage VC₂ becomes equal to or less than the threshold voltage V_(THN), the voltage VC₃ of the node C₃ is Vcc, and the voltage VC₄ of the node C₄ is O V.

Accordingly, the predetermined voltage Vcc.sub.(INV) which is a reference voltage in detecting the decrease of a power supply voltage is expressed by the equation (1).

    Vcc.sub.(INV) ≈3·V.sub.THN                (1)

The threshold voltage V_(THN) is expressed, as described in "the Physics and Technology of Semiconductor Devices", by the equation (2). ##EQU1## where V_(FBP) is a flat-band potential of a p-semiconductor substrate, φ is a Fermi level of a p-semiconductor substrate (φ_(FP) >0),

Cox is a gate capacitance per a unit area,

Ks is a dielectric constant of a substrate,

εo is a permittivity of vacuum, and

N_(A) is an acceptor concentration of a p-semiconductor substrate.

In the following explanation, it is presumed that,

    Ks=11.8,

    εo=8.854×10.sup.-12 (F/m),

    Cox=εo·K.sub.ox /t.sub.ox,

    and

    Kox=3.8.

In the equation (2), V_(FBP) is expressed by the equation (3). ##EQU2## where φμ is a work function of an aluminum electrode, φsp is a work function of a p-semiconductor,

X is an electron affinity of silicon,

Eg is an energy gap of silicon,

k is Boltzmann constant,

T is absolute temperature, and

Ni is an intrinsic carrier concentration.

In the following explanation, it is presumed that, k=8.62×10⁻⁵ eV/K, and Eg=1.1 eV.

In the equation (2), φ_(FP) is expressed by the equation (4).

    φ.sub.FP =kT/q ln N.sub.A /Ni                          (4)

In the equations (2) to (4), the below described values are substituted.

    φμ=4.252V,

    X=4.1V,

    Eg=1.1eV,

    Cox=0.067×10.sup.-2 F/m (500 Å),

    Ks=11.8,

    N.sub.A =2.5×10.sup.22 /m.sup.3,

    and

    Ni=1.45×10.sup.16 /m.sup.3 (at a temperature of 25° C.).

Thus, φ_(FP) is expressed at a temperature of 25° C. by the equation (5).

    φ.sub.FP =0.37V                                        (5)

The threshold voltage V_(THN) is expressed at a temperature of 25° C. by the equation (6), as a result of the substitution of the above described values into the equation (2). ##EQU3##

Accordingly, the predetermined value Vcc.sub.(INV) is expressed at a temperature of 25° C. by the equation (7). ##EQU4##

On the other hand, φ_(FP) is expressed at a temperature of 100° C. by the equation (8), where Ni is presumed to be 2×10¹⁸ /m³.

    φ.sub.FP =0.30V                                        (8)

Furthermore, the threshold voltage V_(THN) is expressed at a temperature of 100° C. by the equation (9), as explained in the equation (6). Here, Eg is not changed dependent on a temperature. ##EQU5##

Accordingly, the predetermined voltage Vcc.sub.(INV) is expressed at a temperature of 100° C. by the equation (10). ##EQU6##

As understood from the above calculations, the predetermined voltage Vcc.sub.(INV) which is a reference voltage in detecting a decrease of a power supply voltage is changed between 2.85 V and 3.42 V in accordance with a temperature change between 100° C. and 25° C. In other words, the voltage Vcc.sub.(INV) is changed by a voltage range of 0.57 V, as a temperature is changed by a range of 75° C. This phenomenon of the conventional circuit is shown in FIG. 3. As apparent therefrom, the predetermined voltage Vcc.sub.(INV) which is three times the threshold voltage V_(THN) is decreased in an accordance with a negative temperature coefficient, along with the decrease of the threshold voltage V_(THN).

Next, a circuit for detecting a voltage in a memory apparatus in the first preferred embodiment according to the invention will be explained in FIG. 4. The detecting circuit comprises P-channel enhancement mode IGFETs (defined "PE-IGFET" hereinafter) Q₁ and Q₅, ND-IGFETs Q₂ and Q₃, NE-IGFETs Q₄ and Q₆, and an inverter connected between a power supply CC and the ground. In this detecting circuit, a ratio of "W/L" for each IGFET is designed, such that an equivalent resistance of Q₂ is larger than that of Q₁, an equivalent resistance of Q₄ is larger than that of Q₃, a ratio of "W/L" for Q₅ is larger than that for Q₁ by n times, and a ratio of "W/L" for Q₆ is larger than that for Q₄ by n times. Therefore, current IL₁ flowing through Q₁ and Q₂ is determined by a current derived power of Q₂, and current IL₂ flowing through Q₃ and Q₄ is determined by a current derived power of Q₄. For instance, the ratio of "W/L" is designed to be 10/3 for Q₁ and Q₅, and 6/2000 for Q₂, Q₄ and Q₆, and the numbers of "m" and "n" are presumed to be "1" (m=n=1).

In such an instance, the currents of IL₁ and IL₂ are very small to be several 100 nA, respectively, where the power supply voltage Vcc is 5 V.

Operation of the circuit as shown in FIG. 4 will be explained in conjunction with FIGS. 5 and 6, wherein the currents of IL₁ and IL₂ are changed dependent on the power supply voltage Vcc in FIG. 5, and voltages VA₁, VA₂ and VA₄ are changed at nodes A₁, A₂ and A₄ dependent on the power supply voltage Vcc in FIG. 6. As shown in FIG. 6, the voltage VA₁ is fixed at the node A₁ to be "Vcc-(|V_(THP) |+α)" which is a voltage difference necessary for the flowing of the current IL₁ through Q₁, where V_(THP) is a threshold voltage of the PE-IGFETs. The current IL₁ is determined by the equivalent resistance of Q₂. Therefore, where the power supply voltage Vcc is increased to be larger than the threshold voltage |V_(THP) |(Vcc>|V_(THP) |), Q₁ is turned on, so that the current IL₁ which is determined by a current to voltage characteristic of Q₂ as shown in FIG. 5 flows through Q₂.

On the other hand, the voltage VA₃ is fixed at the node A₃ to be of the power supply voltage Vcc, and the current IL₂ is determined by the equivalent resistance of Q₄. Therefore, where the power supply voltage Vcc is increased to be larger than the threshold voltage V_(THN) of the NE-IGFET Q₃, Q₄ is turned on, so that the current IL₂ which is determined by a current to voltage characteristic of Q₄ flows through Q₄. As shown in FIG. 4, Q₁ and Q₅, and Q₄ and Q₆ are connected to provide current mirror circuits, so that Q₅ operates to supply the node A₂ with the current IL₁, and Q₆ operates to supply the ground with the current IL₂. The ratio of "W/L" is designed for Q₂ and Q₄, such that the currents of IL₁ and IL₂ are equal to each other, where the power supply voltage Vcc is equal to the predetermined voltage Vcc.sub.(INV), as shown in FIG. 5. Furthermore, the threshold voltage V_(THN) of Q₂ is designed, such that Q₂ operates in a saturated region, where the power supply voltage Vcc is equal to or larger than the predetermined voltage Vcc.sub.(INV) (Vcc≧Vcc.sub.(INV)). Consequently, the current IL₁ is constant without any dependency of the power supply voltage Vcc.

On the other hand, the current IL₂ is proportional to (Vcc-V_(THN)), because a gate and a drain of Q₄ are commonly connected.

Next, the voltages VA₁, VA₂ and VA₄ of the nodes A₁, A₂ and A₄ will be explained to be changed, where the power supply voltage Vcc is decreased to be lower than a designed value.

Vcc>Vcc.sub.(INV)

As shown in FIG. 5, the current IL₂ is larger than the current IL₁. At this time, the voltage VA₂ of the node A₂ is determined by a ratio of current derived powers of Q₅ and Q₆. Therefore, the voltage VA₂ becomes near the ground potential to be lower than a logic threshold value of the inverter I, because the current derived power of Q₆ is larger than that of Q₅, so that the power supply voltage Vcc is applied to the node A₄ by the inverter I.

(2) Vcc=Vcc.sub.(INV)

Where the power supply voltage Vcc is decreased to be equal to the predetermined voltage Vcc.sub.(INV), the currents of IL₁ and IL₂ become equal to each other. Therefore, the current derived powers of Q₅ and Q₆ become equal to each other, so that the voltage VA₂ is increased at the node A₂. As a result, the currents flowing through Q₅ and Q₆ are equal to the currents of IL₁ and IL₂.

(3) Vcc<Vcc.sub.(INV)

Where the power supply voltage Vcc is more decreased to be lower than the predetermined voltage Vcc.sub.(INV), the current IL₁ becomes larger than the current IL₂. As a result, the current derived power of Q₅ becomes larger than that of Q₆, so that the voltage VA₂ becomes at the node A₂ near the power supply voltage Vcc. At this time, the voltage VA₂ is higher than the logic threshold value of the inverter I, so that the voltage VA₄ of the node A₄ is O V.

Furthermore, a level of the predetermined voltage Vcc.sub.(INV) which is detected to inhibit a writing mode of EEPROM by the circuit for detecting the decrease of a power supply voltage in the preferred embodiment will be obtained as follows. As described before, the power supply voltage Vcc, by which values are equal between the currents of IL₁ and IL₂ (IL₁ = IL₂), is the predetermined value Vcc.sub.(INV). The current IL₁ is expressed by the equation (11), because Q₂ operates in the saturated region. ##EQU7## where β_(D) =W/L·μ_(D) ·Cox for Q₂, μ_(D) is a mobility of the ND-IGFET, and

Cox is a gate capacity of a unit area.

The current IL₂ is expressed by the equation (12), because Q₄ operates in the saturated region in the same manner. ##EQU8## where β_(N) =W/L·μ_(N) ·Cox for Q₄, and μ_(N) is a mobility of the NE-IGFETs Q₄ and Q₆.

The predetermined voltage Vcc.sub.(INV) is expressed by the equation (13), where the equation (11) is equal to the equation (12), and the power supply voltage Vcc is equal to the predetermined voltage Vcc.sub.(INV). ##EQU9##

If it is assumed that the ratio of "W/L" is designed, such that β_(N) is equal to β_(D), the equation (13) is expressed by the equation (14).

    Vcc.sub.(INV) =V.sub.THN -V.sub.THD                        (14)

In the equation (14), V_(THN) is expressed by the aforementioned equation (2), and V_(THD) is expressed by the equation (15). ##EQU10## where Nc is a donor concentration of the IGFET to be a depletion type, and Tc is a donor depth of a substrate.

Where the equations (2) and (5) are substituted into the equation (14), the equation (16) is obtained. ##EQU11##

In the equation (16), Tc, Nc and Cox are not changed substantially in regard to a temperature, so that the predetermined voltage Vcc.sub.(INV) is not changed substantially in regard to a temperature as shown in FIG. 7.

For instance, if it is assumed that,

    Tc=10.sup.-7 m,

    Nc=1.38×10.sup.23 /m.sup.3,

    and

    Cox=0.067×10.sup.-2 F/m.sup.2

the predetermined voltage Vcc.sub.(INV) is 3.3 V as follows. ##EQU12##

In conclusion, the detected voltage is constant to be 3.3 V in the circuit for detecting a power supply voltage according to the invention, even if a temperature is changed.

As understood from the above, a detected voltage Vcc.sub.(INV) is set to be a difference between threshold values of NE- and ND-IGFETs, so that the three terms of the equation (2), that is, the front three terms of the equation (15) which are changed dependent on a temperature are eliminated therefrom. Therefore, only the term which is not changed substantially dependent on a temperature is left therein, so that a temperature dependency of a voltage which is detected in the circuit for detecting a power supply voltage according to the invention is negligible as compared to the conventional one. Furthermore, a degree of freedom for setting a voltage to be detected is increased as compared to a case where a voltage is set to be detected in the multiplication of the threshold voltage V_(THN) by n (n:an integer), as described in the conventional circuit, because a voltage is set to be detected in accordance with the conditions of injecting ions such as a kind of substances to be injected, a doping amount, an accelerating energy, etc.

FIG. 8 shows a circuit for detecting a power supply voltage in a memory apparatus in the second embodiment according to the invention which is applied to a circuit for detecting an input high voltage in an electrically programmable read-only memory (EPROM). In FIG. 8, Q₁₁ and Q₁₅ are PE-IGFETs, Q₁₂ and Q₁₃ are ND-IGFETs, Q₁₄ and Q₁₆ are NE-IGFETs, PP is an external input terminal, and I is an inverter, wherein a threshold voltage of Q₁₄ and Q₁₆ is set to be V_(THN-H) which is larger than a threshold voltage V_(THN) of an NE-IGFET, and a ratio of "W/L" for each IGFET is set in the same manner as in the first preferred embodiment.

In operation, current IL₃ flows through Q₁₁ and Q₁₂, and current IL₄ flows through Q₁₃ and Q₁₄, where a voltage Vpp is changed to be applied to the external input terminal PP, as shown in FIG. 9. In this circumstance, voltages VB₁, VB₂, and VB₄ are changed at nodes B₁, B₂, and B₄, where the voltage Vpp is changed. In the second preferred embodiment, the voltage V_(THN-H) is set to be the power supply voltage Vcc (=5 V), and the ratio of "W/L" for Q₁₂ and Q₁₄ is designed, such that the current IL₃ is equal to the current IL₄ (IL₃ =IL₄), where the applied voltage Vpp is a predetermined voltage Vpp.sub.(INV). As a matter of course, the current IL₃ is determined by an equivalent current of Q₁₂, and the current IL₄ is determined by an equivalent current of Q₁₄ in the same manner as in the first preferred embodiment. Furthermore, Q₁₁ and Q₁₅, and Q₁₄ and Q₁₆ provide current mirror circuits. The below explanation is for voltage changes of the nodes B₁ to B₄ in operation, where the applied voltage Vpp is increased from 0 V.

(1) Vpp<V_(THN-H) =5 V

Where the applied voltage Vpp becomes larger than |V_(THP) |, Q₁₁ is turned on, so that current IL₃ flows through Q₁₁ and Q₁₂. At this time, a voltage VB₃ is approximately [Vpp] at the node B₃, while Q₁₄ is non-conductive. Accordingly, Q₁₅ is conductive, and Q₁₆ is non-conductive, while a voltage VB₂ is [Vpp] at the node B₂, and a voltage is 0 V at the node B₄.

(2) V_(THN-N) ≦Vpp<Vpp.sub.(INV)

Where the applied voltage Vpp becomes a value which is equal to or larger than the voltage V_(THN-H), and smaller than Vpp.sub.(INV), the current IL₃ is not changed, even if the applied voltage is changed, because Q₁₂ operates in the saturated region. On the other hand, Q₁₄ is turned on, so that the current IL₄ flows through Q₁₃ and Q₁₄. As a result, a voltage VB₂ is decreased at the node B₂ from the applied voltage Vpp in accordance with the increase of the applied voltage Vpp, because the voltage VB₂ is determined by current derived powers of Q₁₅ and Q₁₆. At this moment, a voltage VB₄ is still 0 V, because the voltage VB₂ is set to be more than a logic threshold value of the inverter I.

(3) Vpp=Vpp.sub.(INV)

Where the applied voltage Vpp is equal to the predetermined voltage Vpp.sub.(INV) in accordance with the increase of the applied voltage Vpp, the currents IL₃ and IL₄ are equal to each other (IL₃ =IL₄). Accordingly, the current derived powers of Q₁₅ and Q₁₆ are equal to each other to decrease the voltage VB₂, so that the current IL₃ flowing through Q₁₅ and the current IL₄ flowing through Q₁₆ are equal to each other.

(4) Vpp>Vpp.sub.(INV)

Where the applied voltage Vpp is more increased to be larger than Vpp.sub.(INV) (Vpp>Vpp.sub.(INV)), the curent IL₄ is larger than the current IL₃ (IL₄ >IL₃). At this moment, the voltage VB₂ is more decreased to be lower than the logic threshold value of the inverter I, because the current derived power of Q₁₆ is larger than that of Q₁₅. Therefore, the voltage VB₄ is [Vcc] at the node B₄.

Next, the predetermined voltage Vpp.sub.(INV) which is detected in the input high voltage detecting circuit in the second preferred embodiment will be calculated. As explained in the first preferred embodiment, a value of the applied voltage Vpp which meets the relation (IL₃ =IL₄) is the predetermined voltage Vpp.sub.(INV). The current IL₃ is expressed by the equation (11) in the first preferred embodiment, and the current IL₄ is expressed by the equation (17). ##EQU13## where β_(NH) =W/L·μ_(NH) ·Cox for Q₁₄, and

μ_(NH) is mobilities of the NE-IGFET Q₁₄ and Q₁₆.

If it is assumed that the ratio of "W/L" is designed for Q₁₁ and Q₁₄, such that β_(NH) is equal to β_(D), where the equation (11) is equal to the equation (17), the equation (18) is obtained.

    Vpp.sub.(INV) =V.sub.THN-H -V.sub.THD                      (18)

Here, if it is assumed that a concentration and a depth of acceptor which is injected below a gate of a substrate is N_(AC) and T_(A), respectively, the voltage V_(THN-H) is expressed by the equation (19). ##EQU14##

Thus, the voltage Vpp.sub.(INV) is expressed by the equation (20), because the voltage V_(THD) is expressed by the equation (15) as explained in the first preferred embodiment. ##EQU15##

For instnce, if it is assumed that,

    Tc=10.sup.-7 m,

    Nc=1.38×10.sup.23 /m.sup.3

    Cox=0.067×10.sup.-2 F/m.sup.2

    T.sub.A =10.sup.-7 m,

    and

    N.sub.AC =2.1×10.sup.23 /m.sup.3

the voltage Vpp.sub.(INV) is calculated below.

    Vpp.sub.(INV) =3.3V+5V=8.3V

In the equation (20), the voltage Vpp.sub.(INV) is not changed substantially dependent on a temperature, because Tc, Nc, T_(A), N_(AC) and Cox are not changed substantially dependent on a temperature. Accordingly, the same advantage as explained in the frst preferred embodiment is obtained in the second preferred embodiment.

Although an ND-IGFETm, a gate and a drain of which are conmonly connected, is utilized for Q3 in the first and second preferred embodiments, a circuit structure, in which Q₃ is always turned on, and a power supply voltage is obtained at a node A₃, for instance, an ND-IGFET, a gate and a source of which are commonly connected, a PE-IGFET, a gate of which is connected to the ground, etc. may be utilized.

As understood from the above, following advantages are expected in a circuit for detecting a decrease of a power supply voltage, and a circuit for detecting an input high voltage according to the invention.

(1) A detected voltage is not changed substantialy dependent on a temperature, because the detected voltage is determined by a difference of threshold values of NE-IGFET and ND-IGFET, so that terms which are changed dependent on a temperature are all eliminated.

(2) A detected voltage is set to be an arbitrary value, because the detected voltage is set by the ion injection conditions such as a kind of substanees to be injected, a doping amount, an accelerating energy, etc.

Consequently, an EEPROM which is built in a system operating in a wide temperature range can be provided in a market, because an erroneous writing is precisely avoided, even a power supply voltage is decreased in a wide temperature range.

Although the invention has been described with respect to specific embodiment for complete and clear disclosure, the appended claims are not to be thus limited but are to be construed as embodying all modification and alternative constructions that may occur to one skilled in the art which fairly fall within the basic teaching herein set forth. 

What is claimed is:
 1. A circuit for detecting a power supply voltage in a memory system, comprising:a first P-channel field-effect transistor having a source connected to a power supply, and a commonly connected gate and drain; an N-channel depletion mode field-effect transistor having a drain connected to said drain of said first P-channel field-effect transistor, and a gate and a source commonly connected to a ground; a turned on field-effect transistor having a gate and a source connected to said power supply; a first N-channel enhancement mode field-effect transistor having a drain and a gate commonly connected to a drain of said turned on field effect transistor and a source connected to the ground; a second P-channel field-effect transistor having a source connected to said power supply, a gate connected to a common node between said first P-channel field-effect transistor and said N-channel depletion mode field-effect transistor, and a drain connected to a voltage detecting node; a second N-channel enhancement mode field-effect transistor having a drain connected through said voltage detecting node to said drain of said second P-channel field-effect transistor, a gate connected to a common node between said turned on field-effect transistor and said first N-channel enhancement mode transistor, and a source connected to the ground; and an inverter connected between said power supply and the ground, and having an input terminal connected to said voltage detecting node and an output terminal for providing a voltage detected result.
 2. A circuit for detecting a power supply voltage in a memory system, according to claim 1, wherein:an equivalent resistance of said N-channel depletion mode field-effect transistor is larger than that of said first P-channel field-effect transistor; and an equivalent resistance of said first N-channel enhancement mode field-effect transistor is larger than that of said turned-on field effect transistor.
 3. A circuit for detecting a power supply voltage in a memory system, according to claim 1, wherein:said first P-channel field-effect transistor is of an enhancement mode type; said turned-on field-effect transistor is an N-channel depletion mode field-effect transistor; and said second P-channel field-effect transistor is of an enhancement mode type. 